#include <cstdio>
#include <iostream>
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
	int x[5];
	for(int i = 0;i<4;i++)
	{
		scanf("%d",&x[i]);
	}
	sort(x,x+4);
	int a,b,c;
	c = x[3]-x[0];
	b = x[2]-c;
	a = x[0]-b;
	printf("%d %d %d\n",a,b,c);
} 
